package main;

import model.Alumno;
import model.Curso;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		BeanFactory factory = new ClassPathXmlApplicationContext("beans.xml");
		Curso curso = (Curso)factory.getBean("cursoJava");
		
		// Curso
		System.out.println("Curso: "+curso.getName());
		System.out.println("Description: "+curso.getDescription());

		System.out.println("Alumnos en el curso, "+curso.getAlumnos().size());
		for(Alumno alumno : curso.getAlumnos()) {
			System.out.println(" - "+alumno.getName());
		}
		
	}

}
